﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="user-manage.aspx.cs" Inherits="famails.BackEnd.page.user_manage" MasterPageFile="~/Master.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <style>
        #ContentPlaceHolder1_chkBlock {
            width: 20px;
            height: 20px;
        }
    </style>
    <div style="width: 100%; padding: 10px;">
        <!--start content 01-->
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="border: 1px solid #333; padding: 0px; margin-bottom: 10px;">
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 10px 20px; background: #000; color: #fff; font-size: 18px; font-weight: bold; position: relative;">
                <asp:HiddenField ID="hdfId" runat="server" />
                Thêm người dùng
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
                <asp:Panel Visible="false" ID="pnError" runat="server">
                    <div class="error-box round">
                        <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
                    </div>
                </asp:Panel>
                <asp:Panel Visible="false" ID="pnSuccess" runat="server">
                    <div class="confirmation-box round">
                        <asp:Label ID="lblSuccess" runat="server" Text=""></asp:Label>
                    </div>
                </asp:Panel>
            </div>
            <asp:HiddenField ID="hdfUserId" runat="server" />
            <div class="col-md-6 col-xs-12 col-sm-12 col-lg-6" style="height: auto; padding: 10px;">
                <fieldset>
                    <p>
                        <label for="simple-input" style="font-weight: bolder; text-transform: none">
                            Tên người dùng</label>
                        <asp:TextBox ID="txtUsername" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;"></asp:TextBox>
                        <em>Tài khoản này dùng để đăng nhập hệ thống !</em>
                    </p>
                </fieldset>
            </div>
            <div class="col-md-6 col-xs-12 col-sm-12 col-lg-6" style="height: auto; padding: 10px;">
                <fieldset>
                    <p>
                        <label for="simple-input" style="font-weight: bolder; text-transform: none">
                            Nhóm người dùng</label>
                        <asp:DropDownList ID="dropTypeUser" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;">
                        </asp:DropDownList>
                        <em>Loại nhóm người dùng! </em>
                    </p>
                </fieldset>
            </div>
            <div class="col-md-6 col-xs-12 col-sm-12 col-lg-6" style="height: auto; padding: 10px;">
                <fieldset>
                    <p>
                        <label for="simple-input" style="font-weight: bolder; text-transform: none">
                            Mật khẩu</label>
                        <asp:TextBox ID="txtPassword" TextMode="Password" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;"></asp:TextBox>
                        <em>Để đảm bảo tính bảo mật, hệ thống sẽ tự động mã hóa mật khẩu !</em>
                    </p>
                </fieldset>
            </div>
            <div class="col-md-6 col-xs-12 col-sm-12 col-lg-6" style="height: auto; padding: 10px;">
                <fieldset>
                    <p>
                        <label for="simple-input" style="font-weight: bolder; text-transform: none">
                            Nhập lại mật khẩu</label>
                        <asp:TextBox ID="txtRePassword" TextMode="Password" runat="server" CssClass="form-control" Style="border: 1px solid #333; border-radius: 0px;"></asp:TextBox>
                        <em>Vui lòng xác nhận mật khẩu !</em>
                    </p>
                </fieldset>
            </div>
            <div class="col-md-6 col-xs-12 col-sm-12 col-lg-6" style="height: auto; padding: 10px;">
                <fieldset>
                    <p>
                        <label for="simple-input" style="margin-right: 10px; padding-top: 3px; float: left; line-height: 20px;">Khóa</label>
                        <asp:CheckBox ID="chkBlock" Style="float: left;" runat="server" />
                    </p>
                </fieldset>
            </div>
            <div class="col-md-6 col-xs-12 col-sm-12 col-lg-6" style="height: auto; padding: 10px;">
                <fieldset>
                    <button id="Button1" runat="server" class="btn" style="float: left; margin-right: 10px; background: #333; color: #fff; text-align: center; padding: 6px 15px; border-radius: 0px;"
                        onserverclick="btnSave_Click">
                        <i style="margin-right: 10px;" class="fa fa-save"></i>Lưu
                    </button>
                    <button runat="server" class="btn" style="float: left; margin-right: 10px; background: #333; color: #fff; text-align: center; padding: 6px 15px; border-radius: 0px;"
                        onserverclick="btnRefesh_Click">
                        <i style="margin-right: 10px;" class="fa fa-refresh"></i>Làm mới
                    </button>
                </fieldset>
            </div>

        </div>
    </div>
    <div style="width: 100%; padding: 10px;">
        <!--start content 01-->
        <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="border: 1px solid #333; padding: 0px; margin-bottom: 10px;">
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="padding: 10px 20px; background: #000; color: #fff; font-size: 18px; font-weight: bold; position: relative;">
                Danh sách người dùng
            </div>
            <div class="col-md-12 col-xs-12 col-sm-12 col-lg-12" style="height: auto; padding: 10px;">
                <div class=" table-responsive">
                    <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                        <thead>
                            <tr>
                                <th style="width: 50px; text-align: center;">#</th>
                                <th>Người dùng</th>
                                <th>Nhóm người dùng</th>
                                <th>Trạng thái</th>
                                <th style="width: 100px;">Điều chỉnh</th>
                            </tr>
                        </thead>
                        <tbody>
                            <asp:Repeater ID="dlMember" runat="server">
                                <ItemTemplate>
                                    <tr>
                                        <td style="text-align: center;">
                                            <asp:Label ID="No" runat="server"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="Username" runat="server" Text='<%# Eval("Username") %>'></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblUserType" runat="server" Text="Nhóm quản trị"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblStatus" runat="server" Text='<%# Eval("IsBlockText") %>'></asp:Label>
                                        </td>
                                        <td style="text-align: center;">
                                            <%--                                    <asp:HyperLink style="margin-right:5px;" ID="btnEdit"  class="a-link-edit" CommandArgument='<%# Eval("UserId") %>' runat="server"
                                                ToolTip="Thay đổi quyền" onclick="btnEdit_Click" NavigateUrl='<%# "create-role.aspx?departmentId="+Eval("ID") %>'>
                                            <span class="fa fa-pencil"></span> 
                                        </asp:HyperLink>
                                        <asp:HyperLink ID="btnDelete"  class="a-link-edit"  runat="server"                                                      
                                            CommandArgument='<%# Eval("ID") %>' ToolTip="Xóa Nhóm người dùng" OnClientClick="return confirmDelete('Bạn có chắc rằng sẽ xóa nhóm người dùng này không ?')" 
                                            onclick="btnDelete_Click" ><span class="fa fa-trash-o"></span> </asp:HyperLink>--%>
                                            <asp:ImageButton ID="btnEdit" runat="server" ImageUrl="../resource/images/edit-validated-icon.png"
                                                CommandArgument='<%# Eval("UserId") %>' OnClick="btnEdit_Click" />
                                            <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="../resource/images/Delete-icon.png" CommandArgument='<%# Eval("UserId") %>' OnClientClick="return confirmDelete('Bạn có chắc rằng sẽ xóa thuộc tính này không ?')" OnClick="btnDelete_Click" />
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <script>
        $(document).ready(function () {
            $('#dataTables-example').dataTable();
        });
    </script>
</asp:Content>

